{if count($projects) > 0}
<div class="rswidgetmodule">
    <h1>Dự án xung quanh</h1>
    <div class="wapper">
        <ul>
        {foreach from=$projects item=project name=duan_loop}
        <li  class="duan_nearby" {if $smarty.foreach.duan_loop.last == 1} style='border: 0;'{/if} >
            {if $project->thumbnail_path != ''}
                <img src="{$smarty.const.BASE_URL}/phpThumb.php?src={$project->thumbnail_path}&h=60">
            {/if}
            <div >
                <a class="top_right_green" href="{link action='view' module='duanmodule' id=$project->shortname src=$project->src}" title='{$project->name}'>
                    &nbsp;
                </a>
                <a class="name" href="{link action='view' module='duanmodule' id=$project->shortname src=$project->src}" title='{$project->name}'>
                    {$project->name}
                </a>&nbsp;-&nbsp;
                <a class="location" href="{link action=view module=duanmodule src=$project->src province=$project->province->short_name ward=$project->ward->shortname}" title="Xem các dự án trong khu vực {$project->location}">
                    {$project->location}
                </a>
                <div class="des">{trim_name_to_fix text=$project->seo_des length=200}</span>
            </div>
            <div class="clear"></div>
        </li>
        {/foreach}
    </div>
    </ul>
</div>
{literal}
<script language="javascript">
    jQuery(document).ready(function(){
        jQuery(".rswidgetmodule ul .duan_nearby div").hover(function(){
            jQuery(this).children(".top_right_green").fadeIn();
        }, function(){
            jQuery(this).children(".top_right_green").fadeOut();
        });
    });
</script>
{/literal}
{/if}